package com.peter.design.pattern.chain.auth.builderchain;

import com.peter.design.pattern.chain.auth.Member;

/**
 * @Auther: 肖冬
 * @Date: 2020/7/31 01:17
 * @Description:
 */
public class MemberService {
    public void login(String loginName,String loginPass){
        Handler.Builder builder = new Handler.Builder();

        builder.addHandler(new ValidateHandler())
                .addHandler(new LoginHandler())
                .addHandler(new AuthHandler());
        builder.build().doHandler(new Member(loginName,loginPass));
    }
}
